home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 07 - 1991 / 07.08 Aug 91 / Browser sources / Search.h < prev   
Encoding:
C/C++ Source or Header  |  1991-01-19  |  1.3 KB  |  35 lines  |  [TEXT/KAHL]

  1. /******************************************************/
  2. /*                                                                                                      */
  3. /*    Search.h                                                                                  */
  4. /*                                                                                                      */
  5. /*    Not a class - utility routines for string               */
  6. /*    searching.  Separated from CBrowserDoc for ease        */
  7. /*    of testing and tuning.                                                      */
  8. /*                                                                                                      */
  9. /*    Written in Think C version 4.0.2                                  */
  10. /*                                                                                                      */
  11. /*    Allen Stenger    January 1991                                              */
  12. /*                                                                                                      */
  13. /******************************************************/
  14.  
  15. #define _H_Search
  16.  
  17. /* Find next occurrence of search string */
  18. Boolean GoFind(    
  19.     Handle    theTextH,     /* Handle to text                             */
  20.     long         *offsetP);    /* offset into *theTextP to         */
  21.                                             /* start search, also returned     */
  22.                                             /* as the offset where string     */
  23.                                             /* is found                                         */
  24.      /* returns TRUE if found, FALSE if not found */
  25.  
  26. /* Get search string from user and store.  Entering a */
  27. /* null string resets the saved search string.                */
  28. Boolean GetSearchString( void ); 
  29.     /* returns TRUE if user supplies non-empty string,     */
  30.     /* FALSE if user cancels or supplies empty string        */
  31.     
  32. Boolean HaveSearchString( void );
  33.     /* returns TRUE if non-empty search string has been */
  34.     /* entered                                                                                    */
  35.